﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Simulation
{
    // This is the object factory to handle the creation of object
    public class CoastlineData : IDynamicData
    {
        public string DynamicData
        {
            get { return "Coastline"; }
        }

        public UserControl getUserControl()
        {
            // we should implement singleton to ensure only one single exist
            return new CoastlineControl();
        }
    }

	/// <summary>
	/// Interaction logic for CoastlineControl.xaml
	/// </summary>
	public partial class CoastlineControl : UserControl
	{
		public CoastlineControl()
		{
			InitializeComponent();

			Loaded += new RoutedEventHandler(Coastline_Loaded);
		}

		void Coastline_Loaded(object sender, RoutedEventArgs e)
		{
			plotter.Viewport.Visible = new Rect(-180, -90, 360, 180);
		}
	}
}
